<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var person = {
            name: 'xuan',
            age: 20,
            showName: function () {
                alert('我的名字是' + this.name)
            },
            showAge: function () {
                alert('我的年龄' + this.age)
            }
        };

        // 使用对象
        // 调用函数属性
        alert(person.name);
        person.showName();
    </script>
</head>
<body>
    
</body>
</html>